<?php
	require_once("includes/functions.php"); 
	require_once("includes/session_functions.php");
?>

<?php
class Logout extends CI_Controller{
	public function index(){
		if(!isset($_SESSION)){session_start();}
		
		$_SESSION = array();
		
		if(isset($_COOKIE[session_name()])) {
			setcookie(session_name(), '', time()-42000, '/');
		}
		session_destroy();
		
		redirect_to("pages/home");
	}
}
?>